Repository navigation
[server] Implement consumer offset fetches - #5138
Merged
wuchong merged 3 commits intoNov 13, 2026
Merged
Conversation
wuchong
reviewed
Nov 11, 2026
wuchong
reviewed
Nov 11, 2026
Implement the server side of GET_CONSUMER_OFFSETS. Decode all-offset and selected-bucket requests, read committed offsets from the local leader replica, and group the response by source table. Move record_type ahead of group_id in the consumer-offset primary key and scan committed offsets by the (record_type, group_id) prefix. Decode values through the schema getter so old and new value schemas can be read together. Require DESCRIBE permission on every source table named by a selected-bucket request. All-offset requests defer group-level authorization until the consumer-group ACL work lands. Add unit, RPC, and integration tests for selected and all-offset reads, mixed schema versions, authorization, and partitioned and non-partitioned buckets. Update the authorization documentation.
Run consumer offset fetches directly on the RPC worker thread and use the replica-owned schema getter for value decoding. Remove the cached schema getter and decoder fields from ConsumerGroupManager. Order the consumer-offset schema and primary-key encoders with record_type before group_id, and use the same key order for group lookups. Add a non-retriable InvalidRequestException mapped to Errors.INVALID_REQUEST. Use it for invalid GetConsumerOffsets combinations and duplicate table buckets so clients receive a request-level error instead of UNKNOWN_SERVER_ERROR. Update schema, RPC, and integration tests for the refined key order, error mapping, and direct fetch behavior.
pisceslj
force-pushed
the
feature/fip-53-server-fetch-consumer-offsets
branch
from
November 12, 2026 12:28
3c9b5cb to
6a1f0e4
Compare
Closed
1 task done
Cache the decoder with its schema getter so repeated fetches reuse row decoders. Publish both together so concurrent fetches use the matching getter. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 26/26 AI-Contributed/UT: 16/16
wuchong
approved these changes
Nov 12, 2026
Comment on lines
+447
to
+448
| ValueDecoder decoder = | ||
| ConsumerOffsetSchema.createValueDecoder(offsetsReplica.getSchemaGetter()); |
Member
There was a problem hiding this comment.
We should cache this in ConsumerGroupManager. I'm sorry, I think the previous implementation of getValueDecoder is correct.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #5137
Part of #4608.
Implement server-side consumer-offset fetches so clients can read committed offsets for all buckets or selected source-table buckets.
Brief change log
GET_CONSUMER_OFFSETSinTabletServer.record_type, group_id, table_id, partition_id, bucket_idand scan byrecord_type + group_id.ValueDecoderto read old and new value schemas together.DESCRIBEpermission on every source table named in a selected-bucket request.Tests
Targeted Maven verification completed for
fluss-serverand its reactor dependencies. Checkstyle, Spotless, RAT, andgit diff --checkpassed.ConsumerGroupManagerFetchTest: 3 casesConsumerOffsetFetchITCase: 2 casesConsumerOffsetFetchAuthorizationITCase: 1 caseConsumerOffsetTableITCase: 2 casesConsumerOffsetCommitITCase: 1 caseConsumerOffsetSchemaTest: 11 casesTabletServiceTest: 8 casesServerRpcMessageUtilsTest: 19 casesAll 47 distinct cases passed.
API and Format
No RPC schema changes are introduced by this PR. The consumer-offset table primary-key order changes to
record_type, group_id, table_id, partition_id, bucket_id, and prefix scans userecord_type + group_id.Documentation
Updates
website/docs/security/authorization.mdwithGET_CONSUMER_OFFSETSpermission semantics.